import org.rsbot.script.methods.Camera;
import org.rsbot.script.methods.NPCs;
import org.rsbot.script.wrappers.RSNPC;
import org.rsbot.script.wrappers.RSPlayer;

abstract class GuildRanger$NPCAction extends GuildRanger.Action
{
  private final int id;
  private final String action;

  public GuildRanger$NPCAction(GuildRanger paramGuildRanger, int paramInt, String paramString)
  {
    super(paramGuildRanger, null);
    this.id = paramInt;
    this.action = paramString;
  }

  public void execute()
  {
    if (GuildRanger.access$800(this.this$0) == null) {
      GuildRanger.access$802(this.this$0, GuildRanger.access$900(this.this$0).getNearest(new int[] { this.id }));
    }
    if (GuildRanger.access$800(this.this$0) != null)
      if (!GuildRanger.access$800(this.this$0).isOnScreen()) {
        GuildRanger.access$1000(this.this$0).turnTo(GuildRanger.access$800(this.this$0), 10);
      } else if (GuildRanger.access$800(this.this$0).doAction(this.action)) {
        if (!this.this$0.getMyPlayer().isIdle()) {
          this.this$0.sleep(500);
        }
        this.this$0.sleep(1500);
      }
  }

  public void complete()
  {
  }

  public String getDescription()
  {
    return "NPC Action [" + this.action + "]";
  }
}